Magnetic field detectors or sensors for detecting magnetic fields associated with a movable magnetic article are known. The magnetic field is detected by one or more a magnetic field transducers, such as a Hall Effect element or a magnetoresistive device, which provides a signal proportional to the detected magnetic field (i.e., a magnetic field signal). The magnetic field signal is compared to a threshold signal to generate an output signal that changes state when the magnetic field signal crosses the threshold signal.
Magnetic field detectors are often used to detect gear features, such as gear teeth and/or gear slots. A magnetic field detector in this application is commonly referred to as a “gear tooth sensor.” Gear tooth sensors are used in automotive applications to provide information to an engine control unit for ignition timing control, fuel management, and other operations.
In one type of magnetic field detector, sometimes referred to as a slope-activated or peak-referenced detector, the threshold signal differs from the positive and negative peaks (i.e., the peaks and valleys) of the magnetic field signal by a predetermined “threshold offset amount.” Thus, in this type of detector, the output signal changes state when the magnetic field signal comes away from a peak or valley by the predetermined offset amount. In such arrangements, a digital-to-analog circuit (DAC) is used to track the positive and negative peaks of the magnetic field signal to provide a tracking signal.
One way to establish the threshold signal is by using hysteresis associated with the comparator so that the comparator output signal transitions when the magnetic field signal differs from the tracking signal by the comparator hysteresis amount. Thus, in this case, the predetermined threshold offset amount is established by the comparator hysteresis. In another arrangement, the threshold signal is generated by an offset voltage source that provides the threshold signal at a predetermined offset voltage from the tracking signal. Still another way to provide the threshold signal is with the DAC, by having the DAC provide both the tracking signal and the threshold signal at some number of bits difference from the tracking signal.
Detection accuracy can be adversely affected by variations in the magnetic field signal that are attributable to factors other than the passing magnetic article. One source of such magnetic field variations is the spacing (or airgap) between the magnetic article and the magnetic field transducer. Airgap is inversely proportional to the peak-to-peak level of the magnetic field signal, so in small airgap arrangements, the magnetic field signal has a larger peak-to-peak signal level than in larger airgap arrangements.
It can be challenging to choose a threshold signal level that is suitable for both small and large airgap installations. In particular, for larger airgaps, it is desirable for the threshold signal to be closer to the tracking signal (i.e., to use a smaller threshold offset amount) to ensure that the comparator output signal switches as desired; whereas, for smaller airgaps, a threshold signal further from the tracking signal (i.e., a larger threshold offset amount) is desirable in order to prevent output switching due to overshoot on the magnetic field signal.
In certain gear tooth sensors sold by Allegro Microsystems, Inc. of Worcester, Mass. under part numbers ATS631, ATS1637, ATS1633, the threshold offset amount is selected at startup in response to a measurement of the peak magnetic field signal level. If the peak magnetic field signal level is greater than a predetermined amount, then a small airgap is presumed and a relatively large threshold offset amount is used. Alternatively, if the peak magnetic field signal level is less than the predetermined amount, then a large airgap is presumed and a smaller threshold offset amount is used.